#ifndef __HAL_AUDIO_ENC_API_H__
#define __HAL_AUDIO_ENC_API_H__

#include <functional>
#include "common_media_define.h"

namespace El {
namespace Hal {

class IAudioEnc {
public:
    using PacketCallback = std::function<void(const AudioEncPacket &)>;
    virtual ~IAudioEnc() = default;

    static IAudioEnc &GetInstance(int32_t channel, int32_t stream);

    /// 开始音频编码
    virtual int32_t Start(PacketCallback cb) = 0;

    /// 停止音频编码
    virtual void Stop(int32_t handle) = 0;

    /// 获取音频编码格式
    virtual bool GetEncFormat(AudioEncFormat &enc) = 0;
};

}
}

#endif //__DSP_VIDEO_ENC_API_H__
